package com.fengwk.resource.face.constant;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

@Component
@ConfigurationProperties("constant.resource")
public class ResourceConstant {
	
	/**
	 * feign服务路径前缀
	 */
	public static final String FEIGN_CLIENT_NAME = "resource";
	
	/**
	 * 默认图片id
	 */
	public static Long DEFAULT_ICON_ID;
	
	/**
	 * 资源存储绝对路径前缀
	 */
	public static String PRE_FILE_ABSOLUTE_PATH;
	
	/**
	 * 文件uri相对路径前缀
	 */
	public static String PRE_FILE_RELATIVE_PATH;
	
	/**
	 * 当前资源服务器路径前缀
	 */
	public static String PRE_RESOURCE_SERVER_URL;

	/**
	 * 缩略图后缀
	 */
	public static String THUMBNAIL_SUFFIX;
	
	/**
	 * 缩略图压缩质量0-1
	 */
	public static Float THUMBNAIL_QUALITY;
	
	public void setDefaultIconId(Long defaultIconId) {
		DEFAULT_ICON_ID = defaultIconId;
	}

	public void setPreFileAbsolutePath(String preFileAbsolutePath) {
		PRE_FILE_ABSOLUTE_PATH = preFileAbsolutePath;
	}

	public void setPreFileRelativePath(String preFileRelativePath) {
		PRE_FILE_RELATIVE_PATH = preFileRelativePath;
	}

	public void setPreResourceServerUrl(String preResourceServerUrl) {
		PRE_RESOURCE_SERVER_URL = preResourceServerUrl;
	}

	public void setThumbnailSuffix(String thumbnailSuffix) {
		THUMBNAIL_SUFFIX = thumbnailSuffix;
	}

	public void setThumbnailQuality(Float thumbnailQuality) {
		THUMBNAIL_QUALITY = thumbnailQuality;
	}
	
}
